package cn.gigi.ipspringbootstarter.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component("ipProperties")
@ConfigurationProperties(prefix = "tools.ip")
@Data
public class IpProperties {

    /**
     * 日志打印周期，单位：秒
     */
    private Long cycle = 5L;

    /**
     * 是否重置日志数据
     */
    private Boolean reset = false;

    /**
     * 日志输出格式，detail 详细模式、simple 极简模式
     */
    private String model = Model.DETAIL.value;

    public enum Model {
        DETAIL("detail"),
        SIMPLE("simple");

        private String value;

        Model(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

}
